package sctu.edu.java.year2016.team01.zhuming.day20160525.chapter6_1;

/**   创建number类，判断字符mingrijijavabu出现了几次，并打印出出现的次数。
 * Created by Administrator on 2016/5/25.
 */
public class ZiFu {
    public static void main(String []args) {

        String a = new String("mingrikejijavabu");
        char[] ch=a.toCharArray();


        int sum=0;
        for(int j=0;j<ch.length;j++){
            if(  ch[j]=='i')
            sum++;
        }
       System.out.print(sum);
      }
    }
